<template>
  <div>
      <!-- v-loading="listLoading" -->
       <el-table v-loading="listLoading" fit border :data="tableData.list"  style="width: 100%">
        <el-table-column align="center" type="index" label="编号" width="50">
            <template slot-scope="scope">
            {{tableData.pageNumber!==1?scope.$index+1 +  tableData.pageSize * (tableData.pageNumber-1):scope.$index +  tableData.pageNumber}}
            </template>
        </el-table-column>
        <el-table-column align="center" label="分站名称">
            <template slot-scope="scope">
                {{scope.row.station}}
            </template>
        </el-table-column>
        <el-table-column prop="temperature" label="温度">
        </el-table-column>
        <el-table-column label="时间" >
            <template slot-scope="scope">
                <span style="float:left;">{{scope.row.create_time}}</span>
            </template>
        </el-table-column>
        <el-table-column label="状态" width="150">
          <template slot-scope="scope">
                <el-tag :type="scope.row.status=='1'?'success':'danger'"><span>{{scope.row.status=='1'?'开启':'关闭'}}</span></el-tag>
            </template>
        </el-table-column>
        <el-table-column label="警报时间">
          <template slot-scope="scope">
             <span>{{scope.row.create_time}}</span>
            </template>
         </el-table-column>
        <!--<el-table-column align="center" label="操作" width="250" >
            <template slot-scope="scope">
                <! <el-button @click.native="edit(scope.$index)" size="mini" icon="el-icon-edit" type="primary">编辑</el-button> -->
                <!-- <el-button @click="del(scope.$index)" size="mini" icon="el-icon-delete" type="danger">删除</el-button> -->
            <!-- </template> -->
        <!-- </el-table-column> --> 
    </el-table>
    <!-- <div class="page">
        <el-pagination  @current-change="handleCurrentChange" :current-page.sync="tableData.pageNumber" :page-size="tableData.pageSize" layout="total, prev, pager, next, jumper" :total="tableData.totalRow">
        </el-pagination>
    </div> -->
  </div>
</template>
<script>
export default {
  props: {
    tableData: {
      type: Object
    }
  },
  data() {
    return {
      listLoading: false
    }
  },
  methods: {
    handleCurrentChange(val) {
    //   console.log(`当前页: ${val}`);
      this.$store.dispatch('getTableData', val).then(() => {})
    }
  }
}
</script>
<style scoped>
.page {
  float: right;
  margin: 10px 0;
}
</style>
